﻿using System;
using System.Collections;
using System.Configuration;
using System.Data;
using System.Linq;
using System.Web;
using System.Web.Security;
using System.Web.UI;
using System.Web.UI.HtmlControls;
using System.Web.UI.WebControls;
using System.Web.UI.WebControls.WebParts;
using System.Xml.Linq;
using KetBanBonPhuong;

public partial class UserControls_ListSuggestGroup : System.Web.UI.UserControl
{
    protected void Page_Load(object sender, EventArgs e)
    {

    }
    protected void Repeater1_ItemDataBound(object sender, RepeaterItemEventArgs e)
    {
        if (e.Item.ItemIndex < 0)
        {
            return;
        }
        DataRowView row = (DataRowView)e.Item.DataItem;
        HyperLink groupNameHyperLink = (HyperLink)e.Item.FindControl("groupNameHyperLink");
        groupNameHyperLink.Text = row["group_name"].ToString();
        groupNameHyperLink.NavigateUrl = "#";
    }
    protected void Repeater1_PreRender(object sender, EventArgs e)
    {
        Session["UserID"] = 1;
        if (Session["UserID"] != null)
        {
            int UserID = Convert.ToInt32(Session["UserID"].ToString());
            DataTable dt = Group.GetGroupSuggestByUserID(UserID);
            Repeater1.DataSource = dt;
            Repeater1.DataBind();
        }
    }
}
